<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%request.setCharacterEncoding("UTF-8");%>
<jsp:useBean id="ps" class="com.example.javabeantest.javaBeanSamples.Person" scope="page"/>
<!--在这里因为property="age"，所以只匹配了age属性，name属性和sex属性的值为空-->
<jsp:setProperty name="ps" property="age" />
姓名:<jsp:getProperty property="name" name="ps"/><BR>
性别:<jsp:getProperty property="sex" name="ps"/><BR>
年龄:<jsp:getProperty property="age" name="ps"/><BR>
</body>
</html>
